package com.example.academic_affairs_system.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 课程表
 *
 * @author hjx
 * @since 2023-01-31
 */
@Getter
@Setter
@Builder
@Accessors(chain = true)
@TableName("aas_courses")
@ApiModel(value = "AssCourses对象", description = "课程表")
public class AasCourses implements Serializable {

  private static final long serialVersionUID = 1L;

  @TableId(value = "id", type = IdType.AUTO)
  private Long id;

  @ApiModelProperty("课程负责人")
  private Long directorUserId;

  @ApiModelProperty("课程名称")
  @TableField("`name`")
  private String name;

  @ApiModelProperty("课程性质")
  @TableField("`type`")
  private String type;

  @ApiModelProperty("课程描述")
  @TableField("`desc`")
  private String desc;

  @ApiModelProperty(" 创建时间")
  @TableField(fill = FieldFill.INSERT)
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private LocalDateTime createTime;

  @ApiModelProperty("更新时间")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private LocalDateTime updateTime;

  @ApiModelProperty("是否可用")
  @TableLogic
  private Boolean enabled;
}
